package com.rayenterprise.kms.client.remote;

import java.util.List;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.rayenterprise.kms.domain.FinishedStat;
import com.rayenterprise.kms.domain.KNotion;

@RemoteServiceRelativePath("notionService")
public interface NotionRemote extends RemoteService {
	/**
	 * Utility class for simplifing access to the instance of async service.
	 */
	public static class Util {
		private static NotionRemoteAsync instance;
		public static NotionRemoteAsync getInstance(){
			if (instance == null) {
				instance = (NotionRemoteAsync) GWT.create(NotionRemote.class);
			}
			return instance;
		}
	}
	public KNotion getNotion(int notionId);
	public List<KNotion> getAll();
	public KNotion save(KNotion notion);
	public void deleteNotion(KNotion notion);
	public List<FinishedStat> getNotionCompletePercentage();

}
